package com.example.ssu_eduapp.eventlistener;

public final class SsuEduappListenerManager {

	private static ConnectionClosedReceiverListener connectionClosedListener;
	private static ConnectionLoggedInReceiverListener connectionLoggedInListener;
	private static ProgressDialogReceiverListener progressDialogListener;
	
	
	public static void setConnectionClosedReceiverListener(ConnectionClosedReceiverListener listener){
		connectionClosedListener = listener;
	}
	public static ConnectionClosedReceiverListener getConnectionClosedReceiverListener(){
		return connectionClosedListener;
	}
	public static void connectionClosed(){
		if(connectionClosedListener != null){
			connectionClosedListener.connectionClosed();
		}
	}
	
	
	public static void setConnectionLoggedInReceiverListenr(ConnectionLoggedInReceiverListener listener){
		connectionLoggedInListener = listener;
	}
	public static ConnectionLoggedInReceiverListener getConnectionLoggedInReceiverListener(){
		return connectionLoggedInListener;
	}
	public static void connectionLoggedIn(){
		if(connectionLoggedInListener != null){
			connectionLoggedInListener.connectionLoggedIn();
		}
	}
	
	//imsi
	public static void setProgressDialogReceiverListener(ProgressDialogReceiverListener listener){
		progressDialogListener = listener;
	}
	public static ProgressDialogReceiverListener getProgressDialogReceiverListener(){
		return progressDialogListener;
	}
	public static void progressDialgReceiver(boolean msg){
		if(progressDialogListener != null){
			progressDialogListener.progressDialgReceiver(msg);
		}
	}
	
}
